package collection;

import com.sun.media.sound.SoftTuning;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class CollecDemo {

    public static void main(String[] args) {
//        List<String> c=new ArrayList<String>();
//        Collection c1=new ArrayList();
//        c1.add("aaa");
//        c1.add("bb");
//        c1.add("ccc");
//        c1.add("ddd");
//        System.out.println(c1.toString());
//        System.out.println(((ArrayList)c1).size());
//        Collection c2=(ArrayList)(((ArrayList<String>) c1).clone());
//        System.out.println(c2.toString());
//        System.out.println(c2.size());
//        System.out.println(c2.hashCode());
//        c2.clear();
//        System.out.println(c2.hashCode());
//        System.out.println(c2.isEmpty());
            Collection c=new ArrayList<>();

        c.add(new Point(1,2));
        c.add(new Point(3,4));
        c.add(new Point(5,6));
        c.add(new Point(7,8));
        c.add(new Point(9,0));
        c.add(new Point(1,2));
        c.add(new Point(10,20));
        System.out.println(c.size());
        System.out.println(c);
        Point p=new Point(1,2);
        System.out.println(c.contains(p));
        c.remove(p);
        System.out.println(c);
        System.out.println(c.contains(p));
        c.remove(p);
        System.out.println(c);
        System.out.println(c.contains(p));
        c.remove(p);
        System.out.println(c);
        System.out.println(c.contains(p));
    c.clear();

    }


}
